<%@page import="org.timeismoney.payment.model.Item"%>
<%@page import="org.timeismoney.payment.common.Constants"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<jsp:include page="../../js_css.jsp"></jsp:include>
<script src="../../resources/js/admin.js" type="text/javascript"></script>
<script src="../../resources/js/common.js" type="text/javascript"></script>
<title>欢迎进入学生缴费系统</title>
<script>
	$(function() {
		initAdminFunction();
		$(".unitGroup").bind("change",unitSelectOnChanged);
		$("#searchUnitsBtn").bind("click",searchUnitBtnOnClick);
		$("#searchStuBtn").bind("click",searchStuBtnOnClick);
	});
	function downLoadUploadTemplate4All(){
		window.open("../download.do?method=template&all=all");
	}
	function batchUploadErrorInfoDialog(msg){
		$.each(msg, function(i,n){
			$("#errorInfoFs").html($("#errorInfoFs").html()+"行号"+n.excelLineNo+" "+n.errorMsg+"<BR>");
		});
		$( "#batchUploadErrorInfo" ).dialog({
			autoOpen: false,
			height: 300,
			width: 350,
			modal: true,
			buttons: {
				"确定": function() {
					$( this ).dialog( "close" );
				}
			}
		});
		$( "#batchUploadErrorInfo" ).dialog( "open" );
	}
</script>
<style type="text/css">
	a{
		color: red;
	}
</style>
</head>
<body>
	<div id="main">
		<div class="float_left">
			<h2>系统管理界面</h2>
		</div>
		<div class="float_right">
			<a href="../main/">进入支付界面</a>
			<a href="../../logout.do">退出</a>
		</div>
		<div class="clear"></div>
		<div id="tabs">
			<ul>
				<li><a href="#tabs-1">学校单位管理</a>
				</li>
				<li><a href="#tabs-2">学生管理</a>
				</li>
				<li><a href="#tabs-3">缴款项管理</a>
				</li>
				<li><a href="#tabs-4">学年管理</a>
				</li>
				<li><a href="#tabs-5">管理员管理</a>
				</li>
			</ul>
			<div id="tabs-1">
				<strong>对子项进行搜索或添加</strong>
				<div class="search">
					<form action="">
						<table>
							<tr>
								<td>
									学年：
									<select name="schoolYearNo" style='width:110px;'>
									</select>
								</td>
								<c:forEach items="${sessionScope.ATTR_KEY_UNIT_LEVELS}" var="level" varStatus="status">
									<td>
									<c:if test="${status.last==false}">
										&nbsp;${level.levelName}：
										<select class="unitGroup" name="unitNo_${level.levelNo}" style='width:110px;'>
											<option selected="selected">...</option>
										</select>
									</c:if>
									</td>
								</c:forEach>
								<td><input type="button" id="searchUnitsBtn" value="查询"/></td>
								<td><input type="button" id="downloadUnit" value="下载院系结构数据"/></td>
							</tr>
						</table>
					</form>
				</div>
				<div class="uploadUnit">
					<form action="../upload.do?method=uploadUnit" target="uploadFormTarget" enctype="multipart/form-data" method="post" onsubmit="return uploadUnitOnSubmit(this);">
						<table>
							<tr>
								<td><a href="javascript:void(0)" id="downloadUnitTemplate">下载院系模板</a></td>
								<td>
								从电子表格中导入院系数据：
								<input type="file" name="file"/></td>
								<td><input type="submit" value="导入数据"/></td>
							</tr>
						</table>
					</form>
				</div>
				<div class="list">
					<table id="unitList" cellpadding="0" cellspacing="0" class="scroll">
					</table>
					<div id="unitListPager" class="scroll"></div>
				</div>
			</div>
			<div id="tabs-2">
				<div class="search" style="display: none;">
					<form action="">
					<table>
							<tr>
								<td>
						学年：
						<select name="schoolYearNo" style='width:100px;'>
						</select>
						</td>
						<c:forEach items="${sessionScope.ATTR_KEY_UNIT_LEVELS}" var="level">
							<td>
							&nbsp;${level.levelName}：
							<select class="unitGroup" name="unitNo_${level.levelNo}" style='width:100px;'>
								<option selected="selected">...</option>
							</select>
							</td>
						</c:forEach>
						<td><input type="button" class="searchBtn" id="searchStuBtn" disabled="disabled" value="查询"/></td>
						<td><input type="button" id="downloadReport" value="下载缴费报表"/></td>
						</tr>
						</table>
					</form>
				</div>
				<div class="upload" style="display: none;">
					<form action="../upload.do" target="uploadFormTarget" enctype="multipart/form-data" method="post" onsubmit="return uploadFormOnSubmit(this);">
						<table>
							<tr>
								<td><a href="javascript:void(0)" id="uploadTemplate">下载模板</a></td>
								<td>
								从电子表格中导入学生：
								<input type="file" name="file"/><input type="hidden" name="unitNo"/></td>
								<td><input type="submit" value="导入学生"/></td>
								<td><input type="button" value="生成该班学生列表" id="downloadStuReport"/></td>
							</tr>
						</table>
					</form>
				</div>
				<div>
					<form action="../upload.do?method=batchUpload" target="uploadFormTarget" enctype="multipart/form-data" method="post">
						<table>
							<tr>
								<td><a href="javascript:void(0)" onclick="downLoadUploadTemplate4All()">下载模板</a></td>
								<td>
								从电子表格中导入学生(电子表格中指定班级)：
								<input type="file" name="file"/></td>
								<td><input type="submit" value="导入学生"/></td>
							</tr>
						</table>
					</form>
				</div>
				<div class="list">
					<table id="stuList" cellpadding="0" cellspacing="0" class="scroll">
					</table>
					<div id="stuListPager" class="scroll"></div>
				</div>
			</div>
			<div id="tabs-3">
				<div class="list">
					<table id="itemList" cellpadding="0" cellspacing="0" class="scroll">
					</table>
					<div id="itemListPager" class="scroll"></div>
				</div>
			</div>
			<div id="tabs-4">
				<div class="list">
					<table id="yearList" cellpadding="0" cellspacing="0" class="scroll">
					</table>
					<div id="yearListPager" class="scroll"></div>
				</div>
			</div>
			<div id="tabs-5">
				<div class="list">
					<table id="teacherList" cellpadding="0" cellspacing="0" class="scroll">
					</table>
					<div id="teacherListPager" class="scroll"></div>
				</div>
			</div>
		</div>
	</div>
	<div id="stuPaymentDetail" title="学生缴费清单">
		<table id="stuPaymentDetailList" cellpadding="0" cellspacing="0" class="scroll">
		</table>
		<div id="stuPaymentDetailListPager" class="scroll"></div>
	</div>
	<div id="unitPaymentDetail" title="单位统筹缴费清单">
		<table id="unitPaymentDetailList" cellpadding="0" cellspacing="0" class="scroll">
		</table>
		<div id="unitPaymentDetailListPager" class="scroll"></div>
	</div>
	<div id="changePwdDialog" title="修改密码" style="display: none;">
		<form action="../stu.do">
			<input type="hidden" name="method" value="pwd"/>
			<input type="hidden" name="stuNo"/>
			<fieldset>
				<!-- <label for="origPwd">原始密码</label>
				<input type="password" name="origPwd" id="origPwd" class="text ui-widget-content ui-corner-all" /> -->
				<label for="pwd">新密码</label>
				<input type="password" name="pwd" id="pwd" class="text ui-widget-content ui-corner-all" />
				<label for="confirm">确认密码</label>
				<input type="password" name="confirm" id="confirm" value="" class="text ui-widget-content ui-corner-all" />
			</fieldset>
		</form>
	</div>
	<iframe name="uploadFormTarget" style="display: none;"></iframe>
	<div id="batchUploadErrorInfo" title="上传错误" style="display: none;">
		<fieldset id="errorInfoFs">
		</fieldset>
	</div>
</body>
</html>